    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>旋转立方体</title>
        <style>
            *{
                margin: 0;
                padding: 0;
            }
            body{
                background: #cccccc;
            }
            .wrap{
                position: relative;
                height: 200px;
                width: 200px;
                border-radius: 50%;
                border: 3px dashed #e0c711;
                margin: 200px auto;
                transform-style: preserve-3d;
                transform: rotateX(30deg) rotateY(-30deg);
                animation: rotating 18s linear infinite;
            }
            .wrap>div{
                height: 100%;
                width: 100%;
                position: absolute;
                font-size: 46px;
                font-family: "Microsoft YaHei UI";
                text-align: center;
                line-height: 200px;
                color: #000011;

            }
            .box3{
                background: yellow;
                transform-origin: left;
                transform: rotateY(270deg) translateX(-100px);
            }
            .box4{
                background: rgba(6, 189, 255, 0.79);
                transform-origin: right;
                transform: rotateY(-90deg) translateX(100px);
            }
            .box5{
                background: rgba(19, 8, 65, 0.79);
                transform: translateZ(-100px);
            }
            .box6{
                background: rgba(103, 206, 132, 0.79);
                transform: translateZ(100px);
            }
            .box1{
                background: rgba(19, 240, 255, 0.69);
                /*transform-origin: right;*/
                transform: rotateX(-90deg) translateZ(-100px);
            }
            .box2{
                background: rgba(255, 28, 38, 0.69);
                /*transform-origin: right;*/
                transform: rotateX(-90deg) translateZ(100px);
            }
            @keyframes rotating {
                0%{
                    transform: rotateX(0deg) rotateY(0deg) ;
                }
                100%{
                    transform: rotateX(360deg) rotateY(360deg) ;
                }
            }
        </style>
    </head>
    <body>
    <div class="wrap">
            <div class="box1">上</div>
            <div class="box2">下</div>
            <div class="box3">左</div>
            <div class="box4">右</div>
            <div class="box5">前</div>
            <div class="box6">后</div>
    </div>
    </body>
    </html>